<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>菜品类别编辑</title>
    <link href="https://cdn.bootcss.com/twitter-bootstrap/3.0.1/css/bootstrap.css" rel="stylesheet">
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
    <i th:replace="~{common :: baseUrl}"></i>
</head>
<body>
<form class="layui-form layui-form-pane" action=""  lay-filter="example">

    <div class="layui-form-item">

        <div class="layui-inline">
            <label class="layui-form-label">图片样式</label>
            <div class="layui-input-inline">
                <div class="layui-upload">

                    <div class="layui-upload-list">
                        <input hidden name="picPath" id="picPath" th:value="${clothing.picPath}">
                        <img width="100px" height="100px" class="layui-upload-img" name="showPic" id="showPic" th:src="${clothing.picPath}">
                        <p id="uploadText"></p>
                    </div>
                </div>
            </div>
        </div>

    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">货号</label>
        <div class="layui-input-inline">
            <input type="text" readonly name="id" lay-verify="required" th:value="${clothing.id}" placeholder="请输入" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">服装名称</label>
        <div class="layui-input-inline">
            <input type="text" readonly name="name" lay-verify="required" th:value="${clothing.name}" placeholder="请输入" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">男装or女装</label>
        <div class="layui-input-inline">
            <select name="sexType" id="sexType"  lay-filter="sexType"  lay-verify="required"disabled>
                <option value="" >请选择男装or女装</option>
                <option value="1" th:selected="${clothing.sexType == 1}" >男装</option>
                <option value="0" th:selected="${clothing.sexType == 0}" >女装</option>
            </select>
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">服装类别</label>
        <div class="layui-input-inline">
            <select name="categoryId" id="categoryId"  lay-verify="required" disabled >
                <option th:each="f : ${clothingCategoryList}"  th:value="${f.id}" th:text="${f.name}" th:selected="${clothing.categoryId eq f.id}"></option>
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">颜色</label>
        <div class="layui-input-inline">
            <input type="text" name="color" readonly lay-verify="required"  th:value="${clothing.color}" placeholder="请输入" autocomplete="off" class="layui-input">
        </div>
        <div class="layui-form-mid layui-word-aux">请用以“红色-黄色-白色...”方式填写</div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">尺码</label>
        <div class="layui-input-block">
            <input type="checkbox" name="s" title="S" th:checked="${clothing.s == '1'}" th:disabled="${clothing.s != '1'}">
            <input type="checkbox" name="m" title="M" th:checked="${clothing.m == '1'}" th:disabled="${clothing.m != '1'}">
            <input type="checkbox" name="l" title="L" th:checked="${clothing.l == '1'}" th:disabled="${clothing.l != '1'}">
            <input type="checkbox" name="xl" title="XL" th:checked="${clothing.xl == '1'}" th:disabled="${clothing.xl != '1'}">
            <input type="checkbox" name="xxl" title="2XL" th:checked="${clothing.xxl == '1'}" th:disabled="${clothing.xxl != '1'}">
            <input type="checkbox" name="xxxl" title="3XL" th:checked="${clothing.xxxl == '1'}" th:disabled="${clothing.xxxl != '1'}">
            <input type="checkbox" name="xxxxl" title="4XL" th:checked="${clothing.xxxxl == '1'}" th:disabled="${clothing.xxxxl != '1'}">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">面料</label>
        <div class="layui-input-inline">
            <input type="text" name="shellFabric" readonly  th:value="${clothing.shellFabric}" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
        </div>
    </div>



    <div class="layui-form-item">
        <label class="layui-form-label">品牌</label>
        <div class="layui-input-inline">
            <input type="text" name="brand"  readonly th:value="${clothing.brand}" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">基本风格</label>
        <div class="layui-input-inline">
            <input type="text" name="basicStyle"  readonly th:value="${clothing.basicStyle}" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">适用对象</label>
        <div class="layui-input-inline">
            <input type="text" name="applyObject" readonly  th:value="${clothing.applyObject}" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">适用季节</label>
        <div class="layui-input-inline">
            <input type="text" name="applySeason"  readonly th:value="${clothing.applySeason}" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">适用场景</label>
        <div class="layui-input-inline">
            <input type="text" name="applyScene" readonly  th:value="${clothing.applyScene}" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">薄厚</label>
        <div class="layui-input-inline">
            <input type="text" name="thickness" readonly  th:value="${clothing.thickness}" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">材质成分</label>
        <div class="layui-input-inline">
            <input type="text" name="materialComponent"  readonly th:value="${clothing.materialComponent}" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button type="button" id="cancel" class="layui-btn ">返回</button>
        </div>
    </div>

</form>



</body>
<script th:src="@{/layui/layui.js}"></script>
<script th:inline="none">
    //JavaScript代码区域
    layui.use(['element','form','upload','layer','laydate'], function() {
        var element = layui.element;
        var form = layui.form;
        var upload = layui.upload;
        var layer = layui.layer;
        var laydate = layui.laydate;
        var $ = layui.$;

        //取消
        $("#cancel").click(function (){
            var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
            parent.layer.close(index); //再执行关闭


        });






    });

</script>
</html>